package com.lifeng.security;

import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * Created by lifeng on 2019/8/9.
 */
public class MySecurityUser extends User{
    //此处可以扩展其他字段
    private com.lifeng.bean.User user;

    public com.lifeng.bean.User getUser() {
        return user;
    }

    public void setUser(com.lifeng.bean.User user) {
        this.user = user;
    }

    public MySecurityUser(String userName, String password, Collection<? extends GrantedAuthority> authorities){
        super(userName,password,authorities);
        //此处可以扩展其他字段
    }

    public MySecurityUser(com.lifeng.bean.User user,String userName, String password, Collection<? extends GrantedAuthority> authorities){
        super(userName,password,authorities);
        //此处可以扩展其他字段
        this.user = user;
    }
}
